extends Polygon2D
var anglestep=6.28/30
var radius
class_name Circle


func _init(_radius=30):
	
	radius = _radius
	var start = 0
	var finish = PI*2
	var pool = PoolVector2Array()
	
	var angle = start
	#arch
	while (angle <= finish):
		pool.push_back(radius * Vector2(cos(angle), sin(angle)))
		angle = angle + anglestep
	# close precisely
	angle = finish
	
	pool.push_back(radius*Vector2(cos(angle),sin(angle)))
	polygon=pool
